package codeforces25;

import java.util.Scanner;

/**
 * Codeforces 25. Problem A
 * 
 * @author Aleksandr Nikiforov
 */
public class ProblemA {

	public static void main(String[] args) {
		ProblemA problem = new ProblemA();
		problem.solve();
	}

	private void solve() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = sc.nextInt();
		}
		for (int i = 0; i < n; i++) {
			int cnt = 0;
			for (int j = 0; j < n; j++) {
				if (i != j && ((a[i] + a[j]) % 2 == 1)) {
					cnt++;
				}
			}
			if (cnt == n - 1) {
				System.out.println(i + 1);
				return;
			}
		}
	}

}
